package org.lex.ftp.ui.actions;

import java.awt.Window;
import java.awt.event.ActionEvent;
import javax.swing.KeyStroke;

import org.lex.ftp.FTP;
import org.lex.ftp.ui.prefs.FTPPreferenceDialog;

public class PreferencesAction extends FTPAction {
	public PreferencesAction(FTP app) {
		super(app);
		this.setName("Preferences...");
		this.setAcceleratorKey(KeyStroke.getKeyStroke("F6"));
	}

	public void actionPerformed(ActionEvent e) {
		Window root = app.getRootWindow();
		FTPPreferenceDialog dialog = new FTPPreferenceDialog(root);
		dialog.setLocationRelativeTo(root);
		dialog.setVisible(true);
	}
}
